/********************
 * GtkMessageDialog *
 ********************/

window.dialog.message {
  .titlebar {
    min-height: 20px;
    background: none;
    box-shadow: none;
    border: none;
  }

  .dialog-action-area {
    border: none;
    box-shadow: inset 0 1px $border_color;
    margin: 0;
    border-spacing: $base_padding;
    padding: $base_padding;

    > button {
      @extend %button_basic_flat;
      padding: $base_padding + 4px $base_padding + 8px; // labels are not vertically centered on message dialog, this is a workaround
      border-radius: $button_radius;
      border: none;
      background-clip: padding-box;

      &.suggested-action {
        color: $accent_bg_color;
      }

      &.destructive-action {
        color: $destructive_color;
      }

      &.default {
        &, &:focus:not(:hover):not(:active) { color: $success_color; }
      }
    }
  }

  box.dialog-vbox.vertical {
    margin-top: $base_padding;
    border-spacing: $small_size;

    > box > box > box > label.title {
      font-weight: 800;
      font-size: 15pt;
    }
  }
}

/********************
 * AdwMessageDialog *
 ********************/

window.messagedialog,
dialog-host > dialog.alert sheet,
window.dialog-window.alert {
  background-color: $dialog_bg_color;
  color: $dialog_fg_color;
}

dialog-host > dialog.alert.floating sheet,
window.dialog-window.alert {
  border-radius: $window_radius + $base_padding;

  @if $rimless == 'true' {
    outline: 0 none transparent;
    box-shadow: $shadow-z16,
    0 0 36px transparent;
  } @else {
    outline-offset: -1px;
    outline: 1px solid $window_outline_color;
    box-shadow: $shadow-z16,
    0 0 36px transparent,
    0 0 0 1px $headerbar_darker_shade_color;
  }
}

window.messagedialog {
  .message-area {
    padding-top: $medium_size - 4px;
    padding-bottom: $base_padding * 2;
    border-spacing: $small_size;

    &.has-heading.has-body {
      border-spacing: $base_padding + 4px;

      > .child {
        margin-top: $base_padding + 2px;
      }
    }

    > .heading-bin, > .body, > .child {
      padding-left: $small_size;
      padding-right: $small_size;
    }
  }

  .response-area {
    padding: $base_padding;
    border-spacing: $base_padding;

    > button {
      min-height: $small_size;
      min-width: $large_size + 12px;
      padding: $base_padding + 2px $base_padding + 8px;
      border-radius: $button_radius;
      margin: 0;

      &.suggested {
        color: $accent_bg_color;
      }
  
      &.destructive {
        color: $destructive_color;
      }
    }

    > separator {
      background: none;
      margin: $base_padding / 2;
    }
  }
}

dialog.alert.floating {
  .message-area {
    padding-top: $medium_size - 4px;
    padding-bottom: $base_padding * 2;
    border-spacing: $small_size;

    &.has-heading.has-body {
      border-spacing: $base_padding + 4px;

      > .child {
        margin-top: $base_padding + 2px;
      }
    }

    > .heading-bin, > .body, > .child {
      padding-left: $small_size;
      padding-right: $small_size;
    }
  }

  .response-area {
    padding: $base_padding * 2;
    padding-top: $base_padding * 3;
    border-spacing: $base_padding * 2;

    > button {
      min-height: $small_size;
      min-width: $large_size + 12px;
      padding: $base_padding + 2px $base_padding + 8px;
      border-radius: $button_radius;
      margin: 0;

      &.suggested {
        color: $accent_bg_color;
      }
  
      &.destructive {
        color: $destructive_color;
      }
    }
  }

  &.short {
    .message-area {
      padding-top: $small_size;
      border-spacing: $base_padding * 2 + 6px;

      > .heading-bin, > .body, > .child {
        padding-left: $base_padding * 2 + 6px;
        padding-right: $base_padding * 2 + 6px;
      }

      &.has-heading.has-body {
        border-spacing: $base_padding;
      }
    }

    .response-area {
      padding: $base_padding * 2 + 6px;
      padding-top: $base_padding * 1.5;

      > button {
        min-width: 0;
        padding: $base_padding + 2px $base_padding * 2 + 4px;
      }
    }
  }
}
